package StudyCode.summary.mydatetime;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class MySimpleDateFormat {
	public static void main(String args[]) {
		Date date = new Date();
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
		String strDate = simpleDateFormat.format(date);
		System.out.println("Date: " + date);
		System.out.println("Date 转为 String: " + strDate);
	}
}
